import java.util.Scanner;

public class SeventhQuestion {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        String name = "蒋金鑫";
        int password = 951218;

        System.out.println("请输入用户名和密码");

        for (int i =3; i >0; i--) {
            String name1 = input.next();
            int password1 = input.nextInt();
            if (name.equals(name1) && password == password1) {
                System.out.println("登录成功");
                break;
            } else {
                if (i==1){
                    System.out.println("输入次数过多，系统已经关闭");
                    break;
                }
                System.out.println("用户名或密码错误,你还有"+ (i-1) +"次机会请重新输入");
            }
        }
    }
}